<template>
  <div class="echarts">
    <ECharts
      :option="option"
      height="1100"
      :onClick="handlePieClick"
      :resize="false"
    />
  </div>
</template>

<script setup lang="ts">
import ECharts from "../index.vue";
import { defineEmits } from "vue";
import { useRelevanceHook } from "./hooks";

interface Props {
  data: any;
  info: any;
  searchType: string;
}

const props = withDefaults(defineProps<Props>(), {
  data: []
});

const emits = defineEmits(["querySubPieData"]);

const { option, handlePieClick } = useRelevanceHook(props, emits);
</script>
<style lang="postcss" scoped>
.echarts {
  width: 100%;
  height: 100%;
}
</style>
